from manim import *

# python -m manim -r 1920,1080 circle_to_square.py CircleToSquare -p
class CircleToSquare(Scene):
    def construct(self):
        # create a circle
        circle = Circle(radius=1,color=BLUE,fill_opacity=0.5)
        self.add(circle)
        self.play(Rotate(circle,angle=2*PI),run_time=2)
        self.play(Transform(circle, Square()))
        self.play(Rotate(circle, angle=2 * PI), run_time=2)
        self.play(Transform(circle, Circle()))
        self.wait(1)